-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(cheatcodes): use make_acc_non_empty
in mockCalls_1Call
, mockCall_1Call
, mockCall_3Call
for consistency
#11443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This makes sense to me, I am not sure why this was treated as a special case For context: foundry/crates/cheatcodes/src/evm/mock.rs Lines 211 to 223 in 6e6341b
|
Maybe just a copy-paste oversight. All the other mock functions follow the same pattern with |
I think we want a sig to bypass that at some point but subject to discussion #10703 (comment) |
I think that's fine but could be breaking change for some projects assuming that will revert |
Hi @aganisgash would you mind also making this change for foundry/crates/cheatcodes/src/evm/mock.rs Line 62 in 92f1c64
foundry/crates/cheatcodes/src/evm/mock.rs Line 88 in 92f1c64
This aligns the behavior for all |
@zerosnacks Sure, all fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thank you
mockCalls_1Call
, mockCall_1Call
, mockCall_3Call
for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
mockCalls_1Call
, mockCall_1Call
, mockCall_3Call
for consistencymake_acc_non_empty
in mockCalls_1Call
, mockCall_1Call
, mockCall_3Call
for consistency
All other mock functions use
make_acc_non_empty
to etch a single byte onto empty accounts, which prevents Solidity'sextcodesize
check from failing when mocking calls to addresses without existing bytecode.Makes
mockCalls_1Call
consistent with the other mock cheatcodes and ensures mocked calls work correctly in all scenarios.